/// @description Insert description here
// You can write your code in this editor
if(!global.gamePaused)
{
	//弹
	if(bounceCount != 0)
	{
		bounce += (pi * bounceSpeed);
		if(bounce > pi)
		{
			bounce -= pi;
			bounceHeight *= 0.6;
			bounceCount--;
		}
		z =  sin(bounce) * bounceHeight;
	}//bounceCount
	else z = 0;
	
	//消亡
	deteriorate++;
	if(deteriorate > deteriorateAfter)
	{
		image_alpha -= 1/deteriorateTime;
		if(image_alpha <= 0 ) instance_destroy();
	}
	//摩擦
	fric = 0.05;
	if(z == 0) fric = 0.10;
	
	//移动
	x += lengthdir_x( spd, direction);
	y += lengthdir_y( spd, direction);
	
	if(tilemap_get_at_pixel(collisionMap, x, y) > 0) spd = 0;
	spd = max(spd - fric, 0);
	
}//pause







